package com.github.hxl.upload.demo.config;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Config {

	public static String fileDir;

	static {
		ClassLoader loader = Config.class.getClassLoader();
		InputStream inputStream = null;

		try {
			inputStream = loader.getResourceAsStream("config.properties");
			Properties prop = new Properties();
			prop.load(inputStream);

			fileDir = prop.getProperty("file.dir");

		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			if (null != inputStream) {
				try {
					inputStream.close();
				} catch (IOException e) {
					// ignore
				}
			}
		}

	}

}
